<%@ page contentType="text/html;charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page import="com.ufida.ebscg.portal.web.form.RegisterSupplierMessForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>招商银行供应商门户-采购创造价值-供应商自助_信息修改01</title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<link href="../css/style_add.css" rel="stylesheet" type="text/css" />
<link href="css/selfcss.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
	@import url(css/select2css.css);
-->
</style>
<script type="text/javascript" src="js/select2css.js"></script>
<script language="JavaScript" type="text/javascript" src="../calendar/WdatePicker.js"></script>
</head>

<body style="width:600px" >

<div id="main">
<div id="right">
<html:form action="self/modifyperson.do" method="post">
<input type="hidden" value="1" name="steptype"/>
<input type="hidden" name="zdy8" value="${message.zdy8}"/>
<input type="hidden" name="zdy6" value="${message.zdy6}"/>
<input type="hidden" id="changeField" name="changeField"/>
  <table width="610" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td>
      
	      <table width="610" border="0" cellpadding="0" cellspacing="0" background="images/self_bjc_001.jpg" height="26">
	        <tr>
	          <td width="10" align="center">&nbsp;</td>
	          <td width="85" align="center" class="f-14-2b5577">基本信息</td>
	          <td width="83" align="center" class="f-14-818080"><a href="modifyperson.do?to=1&steptype=1">联系信息</a></td>
	          <td width="83" align="center" class="f-14-818080"><a href="modifyperson.do?to=1&steptype=2">其他信息</a></td>
	          <td width="85" align="center" class="f-14-818080"><a href="modifyperson.do?to=1&steptype=3">多联系人</a></td>
	          <td width="85" align="center" class="f-14-818080"><a href="modifyperson.do?to=1&steptype=4">文档上传</a></td>
	          <td>&nbsp;</td>
	        </tr>
	      </table>
	      
      </td>
      </tr>
    <tr>
      		<td >&nbsp;</td>
    </tr>
    <tr>
      <td align="left">
      
      <table width="610" border="0" align="right" cellpadding="0" cellspacing="0">
        <tr>
          <td class="textright">公司名称：</td>
          <td valign="middle" colspan=3 >
          	<html:text property="name" style="width:95%;" maxlength="50" size="30"  onblur="onblurdo(this)" value="${message.name}" ></html:text>
            <span class="f-12-F60000">*</span></td>
        </tr>
        <tr>
				<td class="textright">
					公司地址：
				</td>
				<td valign="middle" colspan=3 >
					<html:text property="corp_address" style="width:95%;" maxlength="256" size="20" onblur="onblurdo(this)" value="${message.corp_address}"></html:text>
					<span class="f-12-F60000">*</span>
				</td>
		</tr>
        <tr>
				<td class="textright" width="23%">
					法人代表：
				</td>
				<td width="30%">
					<html:text property="corporation" maxlength="50" size="20" onblur="onblurdo(this)" value="${message.corporation}"></html:text>
					<span class="f-12-F60000">*</span>
				</td>
				<td class="textright" width="17%">
					营业执照注册号：
				</td>
				<td width="30%">
					<html:text property="regno" style="width:87%;" maxlength="128" size="20" onblur="onblurdo(this)" value="${message.regno}"> </html:text>
					<span class="f-12-F60000">*</span>
				</td>
		</tr>
        <tr>
				<td class="textright">
					上级母公司名称(如有)：
				</td>
				<td>
					<html:text property="sjmgsmc" maxlength="256" size="20" value="${message.sjmgsmc}"></html:text>
				</td>
				<td class="textright">
					税务登记证号码：
				</td>
				<td>
					<html:text property="swdjzhm" style="width:87%;" maxlength="50" size="20" onblur="onblurdo(this)" value="${message.swdjzhm}"> </html:text>
					<span class="f-12-F60000">*</span>
				</td>
		</tr>
		<tr>
				<td class="textright">
					公司性质：
				</td>
				<td>
					<select name="property2">
						<option value="1" 
							<logic:equal value="1" name="message" property="property2">
								selected
							</logic:equal>
						>国营</option>
						<option value="2"
						
						<logic:equal value="2" name="message" property="property2">
							selected
						</logic:equal>
						
						>集体</option>
						<option value="3"
						
						<logic:equal value="3" name="message" property="property2">
							selected
						</logic:equal>
						
						>股份制</option>
						<option value="4"
						
						<logic:equal value="4" name="message" property="property2">
							selected
						</logic:equal>
						
						>民营</option>
						<option value="5"
						
						<logic:equal value="5" name="message" property="property2">
							selected
						</logic:equal>
						
						>三资</option>
						<option value="6"
						
						<logic:equal value="6" name="message" property="property2">
							selected
						</logic:equal>
						
						
						>其他</option>
					</select>
					<span class="f-12-F60000">*</span>
				</td>
				<td class="textright">
					市场主体：
				</td>
				<td>
					<select name="sczt">
						<option value="1" 
							<logic:equal value="1" name="message" property="sczt">
								selected
							</logic:equal>
						>集体</option>
						<option value="2"
						
						<logic:equal value="2" name="message" property="sczt">
							selected
						</logic:equal>
						
						>母公司</option>
						<option value="3"
						
						<logic:equal value="3" name="message" property="sczt">
							selected
						</logic:equal>
						
						>子公司</option>
						<option value="4"
						
						<logic:equal value="4" name="message" property="sczt">
							selected
						</logic:equal>
						
						>分公司</option>
						<option value="5"
						
						<logic:equal value="5" name="message" property="sczt">
							selected
						</logic:equal>
						
						>合资公司</option>
					</select>
					<span class="f-12-F60000">*</span>
				</td>
			</tr>
			<tr>
				<td class="textright">
					成立日期：
				</td>
				<td>
					<html:text property="regdate" maxlength="10" size="20" onblur="onblurdo(this)"  value="${message.regdate}" onclick="WdatePicker()" readonly="true"></html:text>
					<span class="f-12-F60000">*</span>
				</td>
				<td class="textright">
					注册资本：
				</td>
				<td>
					<html:text property="regcapital" style="width:85%;" maxlength="50" size="20" onblur="onblurdo(this)" value="${message.regcapital}"></html:text>
					<span class="f-12-F60000">*</span>
				</td>
			</tr>
			<tr>
				<td class="textright">
					员工数量：
				</td>
				<td>
					<html:text property="employeenum" maxlength="50" size="20" onblur="onblurdo(this)" value="${message.employeenum}"></html:text>
					<span class="f-12-F60000">*</span>
				</td>
				<td class="textright">
					营业场地面积：
				</td>
				<td>
					<html:text property="businessarea" style="width:85%;" maxlength="50" size="20" onblur="onblurdo(this)" value="${message.businessarea}"></html:text>
					<span class="f-12-F60000">*</span>
				</td>
			</tr>
			<tr>
				<td class="textright">
					经营期限：
				</td>
				<td colspan="3">
					<html:text property="jyqx" maxlength="50" size="20" onblur="onblurdo(this)" value="${message.jyqx}"></html:text>
					<span class="f-12-F60000">*</span>
				</td>
				<!-- <td class="textright">
					营业执照：
				</td>
				<td>
					<html:text property="yyzz" style="width:85%;" maxlength="128" size="20" onblur="onblurdo(this)" value="${message.yyzz}"> </html:text>
					<span class="f-12-F60000">*</span>
				</td>-->
			</tr>
			<tr>
				<td class="textright">
					组织机构代码证代码（带中横杠）：
				</td>
				<td colspan="3">
					<html:text property="zzjgdm" maxlength="50" size="20" onblur="onblurdo(this)" value="${message.zzjgdm}"></html:text>
					<span class="f-12-F60000">*<html:errors/></span>
				</td>
			</tr>
			<tr>
				<td class="textright">
					是否有过不良纳税记录：
				</td>
				<td colspan="3">
					<select name="is_bad_record">
						<option value="1" 
							<logic:equal value="1" name="message" property="is_bad_record">
								selected
							</logic:equal>
						>是</option>
						<option value="2"
							<logic:equal value="2" name="message" property="is_bad_record">
								selected
							</logic:equal>
						>否</option>
						</select>
					<span class="f-12-F60000">*</span>
				</td>
		</tr>
			<tr>
				<td class="textright">
					不良纳税记录说明(如有)：
				</td>
				<td colspan="3">
					<html:textarea property="brecord_explain" onfocus="onfocusdo(this)" cols="60" rows="3" value="${message.brecord_explain}" style="color:black;font-size:12px;" >
    				</html:textarea>
				</td>
			</tr>
			<tr>
				<td class="textright">
					公司管理团队情况：
				</td>
				<td colspan="3">
					<html:textarea property="team_explain" onfocus="onfocusdo(this)" cols="60" rows="3" value="${message.team_explain}" style="color:black;font-size:12px;" >
    				</html:textarea><span class="f-12-F60000">&nbsp;*</span>
				</td>
			</tr>
			<tr>
				<td class="textright">
					本产品市场主要竞争对手及份额排名：
				</td>
				<td colspan="3">
					<html:textarea property="jzds_pm" cols="60" rows="3" onfocus="onfocusdo(this)" onblur="onblurdo(this)" value="${message.jzds_pm}" style="color:black;font-size:12px;">
    				</html:textarea><span class="f-12-F60000">&nbsp;*</span>
				</td>
			</tr>
			<tr>
				<td class="textright">
					经营活动不良记录（如有）：
				</td>
				<td colspan="3">
					<html:textarea property="bad_record" onfocus="onfocusdo(this)" cols="60" rows="3" onblur="onblurdo(this)" value="${message.bad_record}" style="color:black;font-size:12px;" >
    				</html:textarea>
				</td>
			</tr>
			<tr>
				<td class="textright">
					提供产品类别：
				</td>
				<td colspan="3">
					<html:textarea property="tgcplb" cols="60" rows="3" readonly="true" onblur="onblurdo(this)" value="${message.tgcplb}" style="color:black;font-size:12px;"  onclick="javascript:openwin()">
    				</html:textarea><span class="f-12-F60000">&nbsp;*</span></td>
			</tr>
			<tr>
				<td colspan="4" class="f-12-F60000">
					说明：带“*”的为必填信息；若界面显示不全面，请先设置IE浏览器到兼容性视图，具体操作请见首页相关操作手册。
				</td>
			</tr>
        <tr>
          <td height="30" colspan="4" align="center"><img src="../images/botton_revision .jpg" width="60"  height="20" border="0"  onclick="onclicksubmit()" style="cursor:hand"/></td>
        </tr>
      </table>
      
      </td>
    </tr>
  </table>
</div>
</html:form>
</div>


<script language="javascript">
	function reset()
	{
		document.modifyform.reset();
	}
	
	function onclicksubmit()
	{
		var formtemp = document.modifyform;
		
		if(formtemp.name.value == '')
		{
			formtemp.name.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.corp_address.value == '')
		{
			formtemp.corp_address.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.corporation.value == '')
		{
			formtemp.corporation.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.regno.value == '')
		{
			formtemp.regno.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.zzjgdm.value == '')
		{
			formtemp.zzjgdm.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.swdjzhm.value == '')
		{
			formtemp.swdjzhm.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.property2.value == '')
		{
			formtemp.property2.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.sczt.value == '')
		{
			formtemp.sczt.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.regdate.value == '')
		{
			formtemp.regdate.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.regcapital.value == '')
		{
			formtemp.regcapital.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.employeenum.value == '')
		{
			formtemp.employeenum.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.businessarea.value == '')
		{
			formtemp.businessarea.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.jyqx.value == '')
		{
			formtemp.jyqx.style.backgroundColor="#ffaa44";
			return;
		}
		/*else if(formtemp.yyzz.value == '')
		{
			formtemp.yyzz.style.backgroundColor="#ffaa44";
			return;
		}*/
		else if(formtemp.tgcplb.value == '')
		{
			formtemp.tgcplb.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.jzds_pm.value == '')
		{
			formtemp.jzds_pm.style.backgroundColor="#ffaa44";
			return;
		}else if(formtemp.team_explain.value == '')
		{
			formtemp.team_explain.style.backgroundColor="#ffaa44";
			return;
		}
		if(isChange(formtemp)){
			alert("没有修改任何内容");
			return ;
			}
		formtemp.submit();
	}
	
	
	function onblurdo(obj)
	{
		if(obj.value == '' )
		{
			obj.style.backgroundColor="#ffaa44";
		}else
		{
			obj.style.backgroundColor="#ffffff";
		}
	}
	function onfocusdo(obj){
		if(obj.name == 'jzds_pm'){
			if(document.modifyform.changeField.value.indexOf('jzds_pm') == -1){
				document.modifyform.changeField.value += ',jzds_pm';
			}
		}else if(obj.name == 'brecord_explain'){
			if(document.modifyform.changeField.value.indexOf('brecord_explain') == -1){
				document.modifyform.changeField.value += ',brecord_explain';
			}
		}else if(obj.name == 'team_explain'){
			if(document.modifyform.changeField.value.indexOf('team_explain') == -1){
				document.modifyform.changeField.value += ',team_explain';
			}
		}else if(obj.name == 'bad_record'){
			if(document.modifyform.changeField.value.indexOf('bad_record') == -1){
				document.modifyform.changeField.value += ',bad_record';
			}
		}
		//alert(document.modifyform.changeField.value);
	}
	function openwin() {  
		var k=showModalDialog ("../register/prod_cate_list.do",window.self,"dialogWidth:700px;dialogHeight:450px:center:yes");
		if(k == "")
			return ;
		var pk_name = k.split(";");
		document.getElementsByName('tgcplb')[0].value=pk_name[0];
		document.getElementsByName('zdy8')[0].value=pk_name[1];
	}
	function isChange(formtemp){
		if(formtemp.name.value != '${message.name}')
		{
			formtemp.changeField.value += ',name';
		}
		if(formtemp.corp_address.value != '${message.corp_address}')
		{
			formtemp.changeField.value += ',corp_address';
		}
		if(formtemp.corporation.value != '${message.corporation}')
		{
			formtemp.changeField.value += ',corporation';
		}
		if(formtemp.regno.value != '${message.regno}')
		{
			formtemp.changeField.value += ',regno';
		}
		if(formtemp.zzjgdm.value != '${message.zzjgdm}')
		{
			formtemp.changeField.value += ',zzjgdm';
		}
		if(formtemp.swdjzhm.value != '${message.swdjzhm}')
		{
			formtemp.changeField.value += ',swdjzhm';
		}
		if(formtemp.sjmgsmc.value != '${message.sjmgsmc}')
		{
			formtemp.changeField.value += ',sjmgsmc';
		}
		if(formtemp.property2.value != '${message.property2}')
		{
			formtemp.changeField.value += ',property2';
		}
		if(formtemp.sczt.value != '${message.sczt}')
		{
			formtemp.changeField.value += ',sczt';
		}
		if(formtemp.regdate.value != '${message.regdate}')
		{
			formtemp.changeField.value += ',regdate';
		}
		if(formtemp.regcapital.value != '${message.regcapital}')
		{
			formtemp.changeField.value += ',regcapital';
		}
		if(formtemp.employeenum.value != '${message.employeenum}')
		{
			formtemp.changeField.value += ',employeenum';
		}
		if(formtemp.businessarea.value != '${message.businessarea}')
		{
			formtemp.changeField.value += ',businessarea';
		}
		if(formtemp.jyqx.value != '${message.jyqx}')
		{
			formtemp.changeField.value += ',jyqx';
		}
		/*if(formtemp.yyzz.value != '${message.yyzz}')
		{
			formtemp.changeField.value += ',yyzz';
		}*/
		if(formtemp.is_bad_record.value != '${message.is_bad_record}')
		{
			formtemp.changeField.value += ',is_bad_record';
		}
		if(formtemp.tgcplb.value != '${message.tgcplb}')
		{
			formtemp.changeField.value += ',tgcplb';
		}
		/*var reg=new RegExp("\r\n","g"); 
		var xxxx = formtemp.jzds_pm.value;
		xxxx = xxxx.replace(reg,"＜br＞"); 
		alert(xxxx);*/
		/*if(formtemp.bad_record.value != '${message.bad_record}')
		{
			formtemp.changeField.value += ',bad_record';
		}
		
		if(formtemp.jzds_pm.value != '${message.jzds_pm}')
		{
			formtemp.changeField.value += ',jzds_pm';
		}
		if(formtemp.brecord_explain.value != '${message.brecord_explain}'){
			formtemp.changeField.value += ',brecord_explain';
		}
		if(formtemp.team_explain.value != '${message.team_explain}'){
			formtemp.changeField.value += ',team_explain';
		}*/
		if(formtemp.changeField.value == ''){
			return true;
		}
		return false;
		}
</script>
</body>
</html>
